Added a safety net for when the machine auto-fit-to-window goes wrong.
